/* eslint-disable no-undef */
import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/admservice/adm-superadministrator/adminLogin',
    method: 'post',
    data
  })
}

export function getInfo(token) {
  return request({
    url: '/admservice/adm-superadministrator/info',
    method: 'get',
    params: { token }
  })
}

export function logout() {
  return request({
    url: '/admservice/adm-superadministrator/logout',
    method: 'post'
  })
}
//人脸识别登录
export function faceLogin(img) {
  return request({
    url: '/admservice/timesystem/faceLogin',
    method: 'post',
    headers: {
      'Content-Type': 'application/json',  // 设置请求头，表明正在发送JSON数据
    },
    data: JSON.stringify(img)  // 将数据对象转换为JSON字符串
  })
}

// // 测试用户登录
// export function testLogin(data) {
//   return request({
//     url: `/admService/edu_teacher/adminLogin`,
//     method: 'post',
//     data: data
//   })
// }

